import ArticlePreview from "@/app/components/article-preview/article-preview";
import { List } from "antd";
import React from "react";

export interface CreateArticleProps {
  userInfo: API.GetUserInfoDto;
}

const CreateArticle: React.FC<CreateArticleProps> = ({ userInfo }) => {
  console.log(userInfo);
  
  return (
    <List
      itemLayout="vertical"
      size="large"
      pagination={{
        pageSize: 10,
      }}
      dataSource={userInfo.articles}
      renderItem={(article) => {
        return <ArticlePreview canManage article={article} />;
      }}
    />
  );
};

export default CreateArticle;
